package hn.cch.grammar.gc;

/**
 * 栈溢出用例
 */
public class StackOverflowDemo {

    public static int counter = 0;

    /**
     * 循环递归
     */
    public static void recursive() {
        if (counter > 10000) {
            return;
        }
        System.out.println("recursive:" + ++counter);
        recursive();
    }

    /**
     * -Xss256k
     * @param args
     */
    public static void main(String[] args) {
        recursive();
    }
}
